/*
using MyGeneration/Template/NHibernate (c) by Sharp 1.4
based on OHM (alvy77@hotmail.com)
*/
using System;
using System.Collections;
using System.Collections.Generic;

namespace Model
{

    [Serializable]
    public class GoodsItems
    {
        #region Member Variables

        protected string _id;
        protected string _name;
        protected int? _sort;
        protected string _parentid;
        protected bool _bIsDeleted;
        protected bool _bIsChanged;
        #endregion


        #region Public Properties

        public virtual string Id
        {
            get { return _id; }
            set
            {
                if (value != null && value.Length > 36)
                    throw new ArgumentOutOfRangeException("Id", "Id value, cannot contain more than 36 characters");
                _bIsChanged |= (_id != value);
                _id = value;
            }

        }

        public virtual string Name
        {
            get { return _name; }
            set
            {
                if (value != null && value.Length > 100)
                    throw new ArgumentOutOfRangeException("Name", "Name value, cannot contain more than 100 characters");
                _bIsChanged |= (_name != value);
                _name = value;
            }

        }

        public virtual int? Sort
        {
            get { return _sort; }
            set { _bIsChanged |= (_sort != value); _sort = value; }

        }


        public virtual string ParentId
        {
            get { return _parentid; }
            set
            {
                if (value != null && value.Length > 36)
                    throw new ArgumentOutOfRangeException("ParentId", "ParentId value, cannot contain more than 36 characters");
                _bIsChanged |= (_parentid != value);
                _parentid = value;
            }

        }


        public virtual bool IsDeleted
        {
            get
            {
                return _bIsDeleted;
            }
            set
            {
                _bIsDeleted = value;
            }
        }

        public virtual bool IsChanged
        {
            get
            {
                return _bIsChanged;
            }
            set
            {
                _bIsChanged = value;
            }
        }

        #endregion

    }

}
